<template>
  <a-menu
    id="dddddd"
    v-model:openKeys="openKeys"
    v-model:selectedKeys="selectedKeys"
    style="width: 256px"
    mode="inline"
    @click="handleClick"
  >
    <a-sub-menu key="sub1" @titleClick="titleClick">
      <template #icon>
        <MailOutlined />
      </template>
      <template #title>基础数据</template>
      <!-- <a-menu-item-group key="g1">
        <template #icon>
          <QqOutlined />
        </template> -->
        <!-- <template #title>Item 1</template> -->
        <a-menu-item key="1">基本参数</a-menu-item>
        <a-menu-item key="2">资金来源</a-menu-item>
      <!-- </a-menu-item-group> -->
      <!-- <a-menu-item-group key="g2" title="Item 2"> -->
        <a-menu-item key="3">成本费用</a-menu-item>
        <a-menu-item key="4">收入和税金</a-menu-item>
      <!-- </a-menu-item-group> -->
    </a-sub-menu>
    <a-sub-menu key="sub2" @titleClick="titleClick">
      <template #icon>
        <AppstoreOutlined />
      </template>
      <template #title>报表</template>
      <a-menu-item key="5">01目标企业账面价值表</a-menu-item>
      <a-menu-item key="6">02收购发生前目标企业绩效指标表</a-menu-item>
      <!-- <a-sub-menu key="sub3" title="Submenu"> -->
        <a-menu-item key="7">03目标企业净现金流量预测表</a-menu-item>
        <a-menu-item key="8">04总成本费用估算表</a-menu-item>
        <a-menu-item key="9">05资产折旧摊销估算表</a-menu-item>
        <a-menu-item key="10">06利润与利润分配表</a-menu-item>
        <a-menu-item key="11">07借款还本付息计划表</a-menu-item>
        <a-menu-item key="12">08财务计划现金流量表</a-menu-item>
        <a-menu-item key="13">09项目投资现金流量表</a-menu-item>
        <a-menu-item key="14">10项目资本金现金流量表</a-menu-item>
        <a-menu-item key="15">11投资各方现金流量表</a-menu-item>
        <a-menu-item key="16">12资产负债表</a-menu-item>
        <a-menu-item key="17">13财务指标汇总表</a-menu-item>
      <!-- </a-sub-menu> -->
    </a-sub-menu>
    <a-sub-menu key="sub3">
      <template #icon>
        <SettingOutlined />
      </template>
      <template #title>EVA测算表</template>
      <a-menu-item key="18">14EVA测算表</a-menu-item>
 
    </a-sub-menu>
        <a-sub-menu key="sub4">
      <template #icon>
        <SettingOutlined />
      </template>
      <template #title>敏感性分析</template>
      <a-menu-item key="9">敏感性参数</a-menu-item>
      <a-menu-item key="10">15敏感性分析表</a-menu-item>
      <a-menu-item key="11">16敏感度系数和临界点分析表</a-menu-item>
    </a-sub-menu>
        <a-sub-menu key="sub5">
      <template #icon>
        <SettingOutlined />
      </template>
      <template #title>图表</template>
      <a-menu-item key="9">17项目投资财务内部收益率分析图</a-menu-item>
      <a-menu-item key="10">18项目资本金财务内部收益率分析图</a-menu-item>
      <a-menu-item key="11">19项目盈亏平衡分析图</a-menu-item>
    </a-sub-menu>
  </a-menu>
</template>

<script lang="ts">  
import { defineComponent, ref, watch } from 'vue';
import { MailOutlined, QqOutlined, AppstoreOutlined, SettingOutlined } from '@ant-design/icons-vue';
import type { MenuProps } from 'ant-design-vue';
export default defineComponent({
  components: {
    MailOutlined,
    QqOutlined,
    AppstoreOutlined,
    SettingOutlined,
  },
  setup() {
    const selectedKeys = ref<string[]>(['1']);
    const openKeys = ref<string[]>(['sub1']);
    const handleClick: MenuProps['onClick'] = e => {
      console.log('click', e);
    };
    const titleClick = (e: Event) => {
      console.log('titleClick', e);
    };
    watch(
      () => openKeys,
      val => {
        console.log('openKeys', val);
      },
    );
    return {
      selectedKeys,
      openKeys,

      handleClick,
      titleClick,
    };
  },
});
</script>

